package com.ithuangyl.common.mvp.proxy;

import com.ithuangyl.common.mvp.base.BaseMvpPresenter;
import com.ithuangyl.common.mvp.base.IBaseMvpView;
import com.ithuangyl.common.mvp.factory.IPresenterFactory;

/**
 * 创建代理Presenter接口，持有对IPresenterFactory的引用
 */
public interface IPresenterProxy<V extends IBaseMvpView, P extends BaseMvpPresenter<V>> {
    /**
     * 设置创建Presenter的工厂
     */
    void setPresenterFactory(IPresenterFactory<V, P> presenterFactory);

    /**
     * 获取Presenter的工厂类
     */
    IPresenterFactory<V, P> getPresenterFactory();

    /**
     * 获取创建的Presenter
     */
    P getPresenter();
}

